package com.demo.goods.restapi.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.service.ApiKey;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

@EnableSwagger2
@Configuration
public class AppConfig {
    @Bean
    public ApiInfo apiInfo() {
        return new ApiInfoBuilder()
                .version("1.2.0")
                .title("goods-restapi接口RESTFUL API-v1.2.0-8023/20180521")//版本号+svn版本号
                .build();
    }


    @Bean
    @Primary
    public ApiKey apiKey() {
        return new ApiKey("sskey", "sskey", "header");
    }


}
